![]() |
ALMaSS
1.0
The Animal, Landscape and Man Simulation System
|
The class describing the adult (female) beetle objects. More...
#include <bembidion_all.h>
Public Member Functions | |
Bembidion_Adult (int x, int y, Landscape *L, Bembidion_Population_Manager *BPM) | |
void | ReInit (int x, int y, Landscape *L, Bembidion_Population_Manager *BPM) |
ReInit for object pool. More... | |
virtual | ~Bembidion_Adult () |
virtual void | Step () |
Adult Step. More... | |
virtual void | BeginStep () |
Adult BeginStep. More... | |
virtual void | EndStep () |
Adult EndStep. More... | |
void | SetBodyBurden (double a_pcide) |
void | SetPPPThreshold (double a_thresh) |
void | SetPPPEffectProb (double a_conc) |
void | SetPPPEffectProbDecay (double a_decay) |
void | SetAdultPPPElimRate (double a_rate) |
![]() | |
Bembidion_Base (int x, int y, Landscape *L, Bembidion_Population_Manager *BPM) | |
Constructor. More... | |
void | ReInit (int x, int y, Landscape *L, Bembidion_Population_Manager *BPM) |
ReInit for object pool. More... | |
virtual void | st_Die () |
Common state Die. More... | |
void | CopyMyself (int a_beetle) |
For experimental purposes. More... | |
void | CopyMyselfB (int a_beetle) |
For experimental purposes. More... | |
![]() | |
unsigned | SupplyFarmOwnerRef () |
AnimalPosition | SupplyPosition () |
APoint | SupplyPoint () |
int | SupplyPolygonRef () |
int | Supply_m_Location_x () |
int | Supply_m_Location_y () |
virtual void | KillThis () |
virtual void | CopyMyself () |
void | SetX (int a_x) |
void | SetY (int a_y) |
TAnimal (int x, int y, Landscape *L) | |
virtual void | ReinitialiseObject (int x, int y, Landscape *L) |
Used to re-use an object - must be implemented in descendent classes. More... | |
virtual int | WhatState () |
virtual void | Dying () |
void | CheckManagement (void) |
void | CheckManagementXY (int x, int y) |
![]() | |
int | GetCurrentStateNo () |
Returns the current state number. More... | |
void | SetCurrentStateNo (int a_num) |
Sets the current state number. More... | |
bool | GetStepDone () |
Returns the step done indicator flag. More... | |
void | SetStepDone (bool a_bool) |
Sets the step done indicator flag. More... | |
virtual void | ReinitialiseObject () |
Used to re-use an object - must be implemented in descendent classes. More... | |
TALMaSSObject () | |
The constructor for TALMaSSObject. More... | |
virtual | ~TALMaSSObject () |
The destructor for TALMaSSObject. More... | |
void | OnArrayBoundsError () |
Used for debugging only, tests basic object properties. More... | |
Protected Member Functions | |
void | Init () |
Intitialise attribute values. More... | |
int | st_Forage () |
Foraging behaviour. More... | |
int | st_Aggregate () |
Aggregation behaviour. More... | |
int | st_Hibernate () |
Hibernation behaviour. More... | |
int | st_Dispersal () |
Intiate Dispersal behaviour. More... | |
bool | st_Aging () |
Daily ageing. More... | |
bool | WinterMort () |
Density-independent winter mortality. More... | |
bool | DDepMort () |
Density-dependent mortality. More... | |
int | DailyMovement (int p_distance, bool disp_aggreg) |
Initiates the daily movement for the beelt. More... | |
void | MoveTo (int p_dist, unsigned p_direction, int p_turning) |
Moves attempting egg laying under way. More... | |
int | MoveTo_quality_assess () |
Moves w.r.t. habitat quality only. More... | |
int | MoveToAggr (int p_dist, unsigned p_direction, int p_turning) |
Moves using a stopping rule for hibernation. More... | |
void | Reproduce (int p_x, int p_y) |
Produces the eggs. More... | |
void | CanReproduce () |
Does reproduction if possible. More... | |
virtual bool | DailyMortality () |
Density-independent mortality. More... | |
virtual bool | OnFarmEvent (FarmToDo event) |
Adult reactions to management events. More... | |
virtual void | InternalPesticideHandlingAndResponse () |
Hand pesticide events code for the beetle. More... | |
![]() | |
void | CorrectWrapRound () |
Corrects wrap around co-ordinate problems. More... | |
Protected Attributes | |
double | m_negDegrees |
The number of negative day degrees experienced. More... | |
double | m_HibernateDegrees |
The number of day degrees experienced in the spring which may trigger dispersal. More... | |
int | OldDirection |
The last direction moved. More... | |
int | m_EggCounter |
The number of eggs produced. More... | |
bool | m_CanReproduce |
Signal reproductive readiness. More... | |
double | m_body_burden |
Current body burden of pesticide. More... | |
double | m_currentPPPEffectProb |
Current effect probability. More... | |
![]() | |
int | m_Location_x |
int | m_Location_y |
Landscape * | m_OurLandscape |
![]() | |
int | m_CurrentStateNo |
The basic state number for all objects - '-1' indicates death. More... | |
bool | m_StepDone |
Indicates whether the iterative step code is done for this timestep. More... | |
Static Protected Attributes | |
static param_List15 | pList |
A helper attribute when simulating movement. More... | |
static param_Point | pPoint |
A helper attribute when simulating movement. More... | |
static double | m_AdultPPPElimRate = 0 |
the daily elimination rate for pesticides More... | |
static double | m_PPPThreshold = 0 |
PPP effects threshold. More... | |
static double | m_PPPEffectProb = 0 |
Effect probability on threshold excedence. More... | |
static double | m_PPPEffectProbDecay = 0 |
Effect probability on threshold excedence. More... | |
Additional Inherited Members | |
![]() | |
TTypesOfBeetleState | CurrentBState |
Current behavioural state. More... | |
Bembidion_Population_Manager * | m_OurPopulation |
Pointer to the population manager. More... | |
The class describing the adult (female) beetle objects.
Bembidion_Adult::Bembidion_Adult | ( | int | x, |
int | y, | ||
Landscape * | L, | ||
Bembidion_Population_Manager * | BPM | ||
) |
Constructor
References Init().
|
virtual |
Adult BeginStep.
Reimplemented from Bembidion_Base.
References TAnimal::CheckManagement(), Bembidion_Base::CurrentBState, st_Aging(), and tobs_ADying.
|
protected |
Does reproduction if possible.
References param_List15::BeenThereX, param_List15::BeenThereY, m_CanReproduce, m_EggCounter, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, Bembidion_Base::m_OurPopulation, param_List15::nsteps, pList, random(), Reproduce(), Landscape::SupplyElementType(), Bembidion_Population_Manager::TodaysEggProduction, tole_BeetleBank, tole_Field, tole_FieldBoundary, tole_MownGrass, tole_NaturalGrassDry, tole_NaturalGrassWet, tole_Orchard, tole_PermPasture, tole_PermPastureLowYield, tole_PermPastureTussocky, tole_RoadsideVerge, tole_UnsprayedFieldMargin, tole_WaterBufferZone, and tole_YoungForest.
Referenced by MoveTo().
|
protectedvirtual |
Density-independent mortality.
Determines whether mortality has occured due to density-independen factors. Uses DailyAdultMort as a probability of dying.
References DailyAdultMort, and g_rand_uni.
Referenced by st_Aging().
|
protected |
Initiates the daily movement for the beelt.
Depending whether the beetle is dispersing or aggregating this calls either MoveTo or MoveToAggr.
References AdultTurnRate, DDepMort(), TAnimal::m_OurLandscape, MoveTo(), MoveToAggr(), OldDirection, and Landscape::SupplyTemp().
Referenced by st_Aggregate(), st_Dispersal(), and st_Forage().
|
protected |
Density-dependent mortality.
Determines whether mortality has occured due to density-dependence. Uses ADDepMort1 as a probability of dying if adult beetles are found by GetMapDensity.
References Bembidion_Population_Manager::ADDepMort0, Bembidion_Population_Manager::ADDepMort1, cfg_DDepRange, g_rand_uni, SimplePositionMap::GetMapDensity(), Bembidion_Population_Manager::m_AdultPosMap, TAnimal::m_Location_x, TAnimal::m_Location_y, Bembidion_Base::m_OurPopulation, Population_Manager::SimH, Population_Manager::SimW, and CfgInt::value().
Referenced by DailyMovement().
|
virtual |
Adult EndStep.
Reimplemented from Bembidion_Base.
References g_rand_uni, InternalPesticideHandlingAndResponse(), m_AdultPPPElimRate, m_body_burden, m_currentPPPEffectProb, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, ppp_1, Bembidion_Base::st_Die(), and Landscape::SupplyPesticide().
|
protected |
Intitialise attribute values.
References m_body_burden, m_CanReproduce, m_currentPPPEffectProb, m_EggCounter, m_HibernateDegrees, m_negDegrees, OldDirection, and random().
Referenced by Bembidion_Adult(), and ReInit().
|
protectedvirtual |
Hand pesticide events code for the beetle.
If the body burden exceeds the trigger then an effect is tested for and implemented depending on the pesticide type.
References g_msg, g_rand_uni, m_body_burden, m_currentPPPEffectProb, TAnimal::m_OurLandscape, m_PPPEffectProb, m_PPPEffectProbDecay, m_PPPThreshold, Bembidion_Base::st_Die(), Landscape::SupplyPesticideType(), ttop_AcuteDelayedEffects, ttop_AcuteEffects, ttop_MultipleEffects, ttop_NoPesticide, ttop_ReproductiveEffects, and MapErrorMsg::Warn().
Referenced by EndStep().
|
protected |
Moves attempting egg laying under way.
Move p_distance steps in p_direction with p_turning out of 100 chance of changing p_direction. This function will alter m_Location_x & m_Location_y.
p_direction gives the preferred direction (0-7)
p_distance is the number of steps
The beetles will stop moving in suitable hibernatio habitat late in the year.
This method is very similar to Bembidion_Adult::MoveToAggr but differs in the direction of movement relative to habitat types and the end of movement behaviour. In this case the beetl tries to lay eggs in MoveToAggre it test for hibernation conditions.
Try to reproduce
References param_List15::BeenThereX, param_List15::BeenThereY, CanReproduce(), SimplePositionMap::ClearMapValue(), param_Point::direction, Bembidion_Population_Manager::m_AdultPosMap, TAnimal::m_Location_x, TAnimal::m_Location_y, Bembidion_Base::m_OurPopulation, MoveTo_quality_assess(), param_List15::nsteps, OldDirection, pList, pPoint, random(), SimplePositionMap::SetMapValue(), Population_Manager::SimH, Population_Manager::SimW, Vector_x, Vector_y, param_Point::x, and param_Point::y.
Referenced by DailyMovement().
|
inlineprotected |
Moves w.r.t. habitat quality only.
A version of MoveTo where movement is determined by the suitability of the habitat moved to.
References param_Point::direction, SimplePositionMap::GetMapValue(), MovementMap::GetMapValue(), Bembidion_Population_Manager::m_AdultPosMap, Bembidion_Population_Manager::m_MoveMap, TAnimal::m_OurLandscape, Bembidion_Base::m_OurPopulation, pPoint, random(), Landscape::Warn(), param_Point::x, and param_Point::y.
Referenced by MoveTo().
|
protected |
Moves using a stopping rule for hibernation.
Move p_distance steps in p_direction with p_turning out of 100 chance of changing p_direction. This function will alter m_Location_x & m_Location_y.
p_direction gives the preferred direction (0-7)
p_distance is the number of steps
The beetles will stop moving in suitable hibernatio habitat late in the year.
References SimplePositionMap::ClearMapValue(), FieldHibernateChance, MovementMap::GetMapValue(), Bembidion_Population_Manager::m_AdultPosMap, TAnimal::m_Location_x, TAnimal::m_Location_y, Bembidion_Population_Manager::m_MoveMap, TAnimal::m_OurLandscape, Bembidion_Base::m_OurPopulation, OldDirection, random(), SimplePositionMap::SetMapValue(), Population_Manager::SimH, Population_Manager::SimW, StopAggregationDay, Landscape::SupplyDayInYear(), Landscape::SupplyElementType(), tole_AmenityGrass, tole_BeetleBank, tole_FieldBoundary, tole_Heath, tole_HedgeBank, tole_Hedges, tole_MownGrass, tole_NaturalGrassDry, tole_NaturalGrassWet, tole_Orchard, tole_PermPasture, tole_PermPastureLowYield, tole_PermPastureTussocky, tole_RoadsideVerge, tole_WaterBufferZone, tole_YoungForest, Vector_x, Vector_y, and Landscape::Warn().
Referenced by DailyMovement().
|
protectedvirtual |
Adult reactions to management events.
Reimplemented from TAnimal.
References autumn_harrow, autumn_or_spring_plough, autumn_plough, autumn_roll, autumn_sow, bed_forming, biocide, bulb_harvest, burn_straw_stubble, cattle_out, cattle_out_low, cfg_Adult_InsecticideApplication, cfg_Adult_SoilCultivationMortality, cfg_BeetleHarvestMort, cfg_BeetleStriglingMort, cfg_PesticideTrialAdultTreatmentMort, Bembidion_Base::CurrentBState, cut_to_hay, cut_to_silage, cut_weeds, deep_ploughing, fa_ammoniumsulphate, fa_calcium, fa_greenmanure, fa_manganesesulphate, fa_manure, fa_npk, fa_npks, fa_pk, fa_rsm, fa_sludge, fa_slurry, flammebehandling, flower_cutting, fp_ammoniumsulphate, fp_calcium, fp_greenmanure, fp_liquidNH3, fp_manganesesulphate, fp_manure, fp_npk, fp_npks, fp_pk, fp_rsm, fp_sludge, fp_slurry, fungicide_treat, g_rand_uni, glyphosate, growth_regulator, harvest, hay_bailing, hay_turning, heavy_cultivator_aggregate, herbicide_treat, hilling_up, insecticide_treat, TAnimal::m_OurLandscape, molluscicide, mow, PesticideTrialAdultToxicMort, pigs_out, preseeding_cultivator, preseeding_cultivator_sow, product_treat, random(), row_cultivation, shallow_harrow, sleep_all_day, spring_harrow, spring_plough, spring_roll, spring_sow, spring_sow_with_ferti, straw_chopping, straw_covering, straw_removal, strigling, strigling_hill, strigling_sow, stubble_cultivator_heavy, stubble_harrowing, stubble_plough, swathing, syninsecticide_treat, tobs_ADying, trial_control, trial_insecticidetreat, trial_toxiccontrol, CfgInt::value(), CfgFloat::value(), Landscape::Warn(), water, and winter_plough.
void Bembidion_Adult::ReInit | ( | int | x, |
int | y, | ||
Landscape * | L, | ||
Bembidion_Population_Manager * | BPM | ||
) |
ReInit for object pool.
References Init(), and Bembidion_Base::ReInit().
|
protected |
Produces the eggs.
References struct_Bembidion::BPM, Bembidion_Population_Manager::CreateObjects(), struct_Bembidion::DayDegrees, struct_Bembidion::HowMany, struct_Bembidion::L, TAnimal::m_OurLandscape, Bembidion_Base::m_OurPopulation, struct_Bembidion::x, and struct_Bembidion::y.
Referenced by CanReproduce().
|
inline |
Set body burden elimination rate for adults
References m_AdultPPPElimRate.
Referenced by Bembidion_Population_Manager::Init().
|
inline |
|
inline |
Set body PPP effect probability
References m_PPPEffectProb.
Referenced by Bembidion_Population_Manager::Init().
|
inline |
Set body PPP effect probability
References m_PPPEffectProbDecay.
Referenced by Bembidion_Population_Manager::Init().
|
inline |
Set body PPP threshold
References m_PPPThreshold.
Referenced by Bembidion_Population_Manager::Init().
|
protected |
Aggregation behaviour.
References DailyMovement(), MaxDailyMovement, and random().
Referenced by Step().
|
protected |
Daily ageing.
References Bembidion_Base::CurrentBState, DailyMortality(), m_CanReproduce, m_EggCounter, m_negDegrees, TAnimal::m_OurLandscape, Landscape::SupplyTemp(), and tobs_Hibernating.
Referenced by BeginStep().
|
protected |
Intiate Dispersal behaviour.
Will now move in a direction away from high densities of beetles and towards good habitat
References DailyMovement(), MaxDailyMovement, random(), and WinterMort().
Referenced by Step().
|
protected |
Foraging behaviour.
If it is not yet time to start aggregating then the beetle does its daily movement and returns a zero value, indicating it will stay in this state. If date has exceeded StartAggregatingDay, then the beetle has a increasing probability with time of changing to aggregative behaviour.
If the beetle starts aggregating and it is from last season, then it is assumed that it will die.
References DailyMovement(), m_CanReproduce, TAnimal::m_OurLandscape, MaxDailyMovement, random(), StartAggregatingDay, StartAggregatingDayProb, and Landscape::SupplyDayInYear().
Referenced by Step().
|
protected |
Hibernation behaviour.
Accumulates day degrees from the beginning of the year and starts dispersal when the sum exceeds a threshold or at the beginning of March.
At the end of hibernation the beetle is allowed to reproduce via the m_CanReproduce attribute.
References DipsersalDayDegrees, DispersalThreshold, m_CanReproduce, m_HibernateDegrees, TAnimal::m_OurLandscape, random(), Landscape::SupplyDayInYear(), and Landscape::SupplyTemp().
Referenced by Step().
|
virtual |
Adult Step.
Reimplemented from Bembidion_Base.
References cfg_TotalNoEggs, SimplePositionMap::ClearMapValue(), Bembidion_Base::CurrentBState, g_msg, Bembidion_Population_Manager::m_AdultPosMap, TALMaSSObject::m_CurrentStateNo, m_EggCounter, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, Bembidion_Base::m_OurPopulation, TALMaSSObject::m_StepDone, st_Aggregate(), Bembidion_Base::st_Die(), st_Dispersal(), st_Forage(), st_Hibernate(), tobs_ADying, tobs_Aggregating, tobs_Dispersing, tobs_Foraging, tobs_Hibernating, CfgInt::value(), MapErrorMsg::Warn(), Landscape::Warn(), and WARN_BUG.
|
protected |
Density-independent winter mortality.
References m_negDegrees, and random().
Referenced by st_Dispersal().
|
staticprotected |
the daily elimination rate for pesticides
Referenced by EndStep(), and SetAdultPPPElimRate().
|
protected |
Current body burden of pesticide.
Referenced by EndStep(), Init(), InternalPesticideHandlingAndResponse(), and SetBodyBurden().
|
protected |
Signal reproductive readiness.
Referenced by CanReproduce(), Init(), st_Aging(), st_Forage(), and st_Hibernate().
|
protected |
Current effect probability.
Referenced by EndStep(), Init(), and InternalPesticideHandlingAndResponse().
|
protected |
The number of eggs produced.
Referenced by CanReproduce(), Init(), st_Aging(), and Step().
|
protected |
The number of day degrees experienced in the spring which may trigger dispersal.
Referenced by Init(), and st_Hibernate().
|
protected |
The number of negative day degrees experienced.
Referenced by Init(), st_Aging(), and WinterMort().
|
staticprotected |
Effect probability on threshold excedence.
Referenced by InternalPesticideHandlingAndResponse(), and SetPPPEffectProb().
|
staticprotected |
Effect probability on threshold excedence.
Referenced by InternalPesticideHandlingAndResponse(), and SetPPPEffectProbDecay().
|
staticprotected |
PPP effects threshold.
Referenced by InternalPesticideHandlingAndResponse(), and SetPPPThreshold().
|
protected |
The last direction moved.
Referenced by DailyMovement(), Init(), MoveTo(), and MoveToAggr().
|
staticprotected |
A helper attribute when simulating movement.
Static array to hold the history of adult positions.
Referenced by CanReproduce(), and MoveTo().
|
staticprotected |
A helper attribute when simulating movement.
Static array to hold a list of co-ordinates.
Referenced by MoveTo(), and MoveTo_quality_assess().